package com.mvc.service.impl;
import com.mvc.entity.User;
import com.mvc.mapper.UserMapper;
import com.mvc.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName UserServiceImpl
 * @Description TODO
 * @Author king
 * @Date 2021/11/26 22:52
 * @Version 1.0
 **/
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;
    @Override
    public List<User> listSearch(Integer startRow, Integer limit,Integer id, String uname ,Integer status) {
        return userMapper.listSearch(startRow,limit,id,uname,status);
    }

    @Override
    public Integer getCount(Integer id, String uname ,Integer status) {
        return userMapper.getCount(id,uname,status);
    }

    @Override
    public Integer insert(User User) {
         return userMapper.insert(User) ;
    }

    @Override
    public Integer update(Integer id,Integer status) {
        return userMapper.update(id, status);
    }

    @Override
    public Integer del(Integer id) {
        return userMapper.del(id);
    }
}
